


import java.io.File;
import java.nio.file.Path;

import TaggingSys.FileLabeler;

public class TagBySize implements FileLabeler{


	public String getDescription() {
		return ("Tagging files according to their size");
	}

	
	@Override
	public String[] label(File file) {
		String[] tags = new String[1];
		long length = file.length();
		System.out.println("length = "+ length);
		//File size > 100MB - tag as VERY BIG
		if (length>(1024*1024*100)){
			tags[0]=("Very big");
		}
		//File size > 10MB - tag as BIG
		else if(length>(1024*1024*10)){
			tags[0]=("Big");
		}
		//File size > 10KB - tag as MEDIUM
		else if (length >(1024*10)){
			tags[0]=("Medium");
		}
		//File size < 10Kb - tag as SMALL
		else{
			tags[0]=("Small");
		}	
		return tags;
	}








}
